package com.jy.rhin.infra.repo.document.template.query;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jy.rhin.infra.repo.document.template.mapper.CDADocumentTemplateMapper;
import com.jy.rhin.infra.repo.document.template.po.CDADocumentTemplatePo;
import org.springframework.stereotype.Service;

@Service
public class CDADocumentTemplateQueryHandler extends ServiceImpl<CDADocumentTemplateMapper, CDADocumentTemplatePo> implements IService<CDADocumentTemplatePo> {

    public CDADocumentTemplatePo getByTemplateName(String name){
        LambdaQueryWrapper<CDADocumentTemplatePo> query = new LambdaQueryWrapper<>();
        query.eq(CDADocumentTemplatePo::getTemplateName,name);
        return getOne(query);
    }

}
